package com.GreenWMS.company;

import com.GreenWMS.WarehouseLayout.Warehouse;
import java.util.List;
import java.util.ArrayList;
/*
 * A standard class stands for the company
 * that wants to use the WMS web service.
 * A company may own several warehouse
 * */
public class Company {

    // Loging account
    private String _username;
    private String _password;

    // contact information
    private String _name;
    private String _address;
    private String _telephone;
    private String _contactor;

    // A list of warehouses that owned by this company
    private List<Warehouse> warehouses;

    public Company(String username, String password) {
        this(username, password, "");
    }

    public Company(String username, String password, String name) {
        _username = username;
        _password = password;
        _name = name;
        warehouses = new ArrayList<Warehouse>();
    }

    public String getUsername() {
        return _username;
    }

    public String getPassword() {
        return _password;
    }

    public void setPassword(String password) {
        _password = password;
    }

    public String getName() {
        return _name;
    }

    public void setName(String name) {
        _name = name;
    }

    public String getAddress() {
        return _address;
    } 

    public void setAddress(String address) {
        _address = address;
    }

    public String getTelephone() {
        return _telephone;
    }

    public void setTelephone(String telephone) {
        _telephone = telephone;
    }

    public String getContactor() {
        return _contactor;
    }

    public void setContactor(String contactor) {
        _contactor = contactor;
    }

    public void addWarehouse(Warehouse warehouse) {
        warehouses.add(warehouse);
    }

    public List<Warehouse> getWarehouses() {
        return warehouses;
    }
}
